<?php

namespace App\Observers;

use App\Models\CrawlerUrl;
use App\Jobs\CrawlerArticleJobs;
// creating, created, updating, updated, saving,
// saved,  deleting, deleted, restoring, restored

class CrawlerUrlObserver
{
    public function created(CrawlerUrl $url)
    {
        // 有新地址加入数据库  执行异步任务 抓去内容
        dispatch(new CrawlerArticleJobs($url));
    }
    public function saving()
    {

    }
}
